1. Field of the Invention
The present invention relates to a timer synchronizing device and an initializing method for use in a communication system. In particular, the timer synchronizing device of the present invention can synchronize accurately timers of slave stations connected to a ring communication path.
2. Description of the Prior Art
Conventionally, respective timers connected to a ring communication path are synchronized using a specific communication frame. In the following, one such example will be described. In this example, timers on a ring communication path are synchronized according to SERCOS regulations.
FIG. 6 shows the structure of a conventional ring communication path which includes a master station 64 and slave stations 61, 62, 63. The master station 64 outputs a specific communication frame called SYNC-TELEGRAM for timer synchronization. The frame is first received by the slave station 61, which then corrects its own timer 66 according to the received frame. The slave station 61 also relays the received frame to its subsequent station, so that the slave station 62 receives the relayed frame and corrects its own timer 67 accordingly.
In this manner, respective slave stations connected to the ring communication path 65 sequentially receive the specific frame and correct their timers. This entire process for timer synchronization is completed when a timer correcting operation by the last connected slave station 63 is completed. It should be noted that the timing at which respective slave stations receive the specific frame is gradually delayed as the frame reaches the latter connected stations on the path as a result of a frame relaying process at each station. Because the delay is minimized by setting a 0.5 to 1.5 clock transmission delay at each slave station, disagreement among respective timers can be left uncorrected.
Another example will next be described with reference to FIG. 5. In this example, timer synchronization is achieved with improved transfer efficiency by using a method including a communication frame exchanging process. "Exchanging a communication frame" refers to exchanging a part or the whole of a communication frame transferred through a ring communication path 5, with transmission data 55 at its destination slave station.
In the following, a procedure in which slave stations receive a communication frame will be described.
A destination detection circuit 53 receives a communication frame, beginning with its leading bits. The circuit 53 then compares the destination address of the frame with the address of its own station, which is recorded in its own address storage 54 when the circuit 53 reads the destination address, so as to detect whether or not the received frame addresses its own station as a destination station. If the frame does address that station, the communication frame is supplied to a communication frame exchanging circuit 52. If it does not, the frame is supplied to a relay circuit 51. Every communication frame, including a frame for timer synchronization, is subjected to this destination detection process at each slave station, regardless of its destination. That is, frame transmission is always delayed due to this process (hereinafter this delay time being referred to as a relay process time). A relay process time caused at each station will accumulate as a frame passes through the respective slave stations performing relay processing on the path.
The accumulated relay process time results in a problem in a system, such as a machine tool, whose motors are controlled using this method. That is, reference times at respective motors may disagree with one another due to a relay process time, which is on the order of a few .mu.s for each station, and this may further result in such a system forming an inaccurate trail. For instance, assuming that a relay process time is 6 .mu.s and a feeding time of each motor is 20 m/min, the entire influence of the delay over the system sums up to be 2 .mu.m.
As described above, the conventional timer synchronizing method cannot achieve accurate timer synchronization because of the presence of a transmission time delay, and thus cannot achieve accurate time synchronization among respective slave stations on a ring communication path. Therefore, if a master station and slave stations are connected such that a communication frame is transmitted among the stations at a subtle timing based on the timers which have been synchronized using the conventional method, transmission contents come to be faulty between the master and the slave stations. Moreover, the greater the number of slave stations connected to a path, the greater will be the time delay in latter connected slave stations along the path. Conclusively, the conventional timer synchronizing method in which a transmission time delay is left uncorrected is inappropriate to be used in a ring communication path which requires severe time accuracy.